import request from '@/utils/request'

// 查询托管方案列表
export function listFundWfHosting(query) {
  return request({
    url: '/wfForm/fundWfHosting/list',
    method: 'get',
    params: query
  })
}

// 查询托管方案详细
export function getFundWfHosting(id) {
  return request({
    url: '/wfForm/fundWfHosting/' + id,
    method: 'get'
  })
}

// 保存托管方案
export function saveFundWfHosting(data) {
  return request({
    url: '/wfForm/fundWfHosting/save',
    method: 'post',
    data: data
  })
}

// 删除托管方案
export function delFundWfHosting(id) {
  return request({
    url: '/wfForm/fundWfHosting/' + id,
    method: 'delete'
  })
}

// 导出托管方案
export function exportFundWfHosting(query) {
  return request({
    url: '/wfForm/fundWfHosting/export',
    method: 'get',
    params: query
  })
}

// 根据基金ID获取托管方案
export function findHosingByFundId(fundId) {
  return request({
    url: '/wfForm/fundWfHosting/findHosingByFundId',
    method: 'get',
    params: { 'fundId': fundId }
  })
}

// 根据流程节点ID初始化记录
export function getByWfNodeId(wfNodeId) {
  return request({
    url: '/wfForm/fundWfHosting/getByWfNodeId/' + wfNodeId,
    method: 'get'
  })
}
